{% extends "base.html" %}

{% block script %}
    <script src="/static/js/cms2/note.js"></script>
{% end %}

{% block settings %}
    {% set menu_selected = 'topic' %}
{% end %}

{% block main %}
<div class="main_hd">
    <h2>话题</h2>

    <div class="title_tab" id="topTab">
        <ul class="tab_navs title_tab" data-index="0">
        <li data-index="0" class="tab_nav first js_top selected" data-id="send"><a href="#" class="to-s-note">note管理</a></li>
        <li data-index="1" class="tab_nav js_top" data-id="list"><a href="#" class="to-p-note">发布note</a></li>
        </ul>
    </div>
    <div class="extra_info search_bar" id="searchBar">
        <span class="frm_input_box search with_del append ">
            <a class="del_btn jsSearchInputClose" href="javascript:" style="display:none">
                <i class="icon_search_del"></i>&nbsp;
            </a>
            <a href="javascript:" class="frm_input_append jsSearchInputBt">
                <i class="icon16_common search_gray">搜索</i>&nbsp;
            </a>
        <input type="text" value="" class="frm_input jsSearchInput" placeholder="消息内容">
        </span>
    </div>
</div>
<div class="main_bd">
    <div class="topic-box">
        <div class="show-container">

        </div>
        <div class="more-topic-box">
            <button type="button" class="btn btn_small more-topic">更多</button>
        </div>
    </div>
</div>
{% end %}

{% block template %}
<script type="text/template" id="note-manage-template">
    <div class="t-panel note-panel" id="manage-note-<%- noteid %>">
        <div class="t-panel-heading">
            <div class="t-panel-title">
                用户：<%- user.name %>
            </div>
            <div class="t-edit-box">
                <button type="button" class="btn btn-sm save-n">保存</button>
                <button type="button" class="btn btn-sm edit-n">编辑</button>
                <button type="button" class="btn btn-sm cancel-n">取消</button>
                <button type="button" class="btn btn-sm del-n">删除</button>
            </div>
        </div>
        <div class="padding-box">图片：</div>
        <div class="nt-simgs padding-box">
            <% for(var i=0; i < thumbs.length; i++) { %>
            <!--<img src="<%- thumbs[i] %>" class="<% if(i == 0) { %>active<% } %>">-->
            <span class="nt-simg" style="background-image: url(<%- thumbs[i] %>);"></span>
            <% } %>
        </div>
        <div class="padding-box">
            <div>内容：</div>
            <div><%- note %></div>
        </div>
        <div class="padding-box">
            <div>标签：</div>
            <div class="tn-tags">
                    <% for(var i=0; i < tags.length; i++) { %>
                        <div class="tn-tag"><%- tags[i] %></div>
                    <% } %>
            </div>
        </div>
        <div class="padding-box">
            <div>位置：</div>
            <div class="tn-places">
            <% for(var i=0; i < place.length; i++) { %>
                <div class="tn-place"><%- place[i] %></div>
            <% } %>
            </div>
        </div>
    </div>
</script>
<script type="text/template" id="note-del-template">
<div class="modal fade" id="del-modal-<%- noteid %>" tabindex="-1" role="dialog" aria-labelledby="del-label-<%- noteid %>">
    <div class="modal-dialog" role="document">
    <div class="modal-content">
      <div class="modal-header">
        <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
        <h4 class="modal-title" id="del-label-<%- noteid %>">Modal title</h4>
      </div>
      <div class="modal-body">
        确定删除？<span class="text-danger">不能恢复</span>
      </div>
      <div class="modal-footer">
        <button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
        <button type="button" class="btn btn-primary del-note" data-noteid="<%- noteid %>">确定</button>
      </div>
    </div>
  </div>
</div>
</script>
{% end %}